﻿using System;
using System.Collections.Generic;
using System.Text;
using MINERP.COM;

namespace MINERP.MODEL.FoundationModel
{
    /// <summary>
    /// 实体类Grid
    /// </summary>
    public class Grid_Info
    {
        #region 私有字段

        private int _subAreaId;
        private int _gridId;
        private string _gridName;
        private int _someId;
        private DateTime _firstEnterTime;
        private int _status;
        public DateTime CompleteTime;

        #endregion

        public int GridType { get; set; }
        public bool IsComplete { get; set; }

        public int AllNum { get; set; }

        public int InNum { get; set; }

        public string DisplayNum
        {
            get { return InNum.ToString() + "/" + AllNum.ToString(); }
        }

        public DateTime OrderEnterTime { get; set; }

        public string OrderName { get; set; }
        public string CtmName { get; set; }

        #region 公开属性

        /// <summary>
        /// 格子的程序状态
        /// </summary>
        public TempGridStatus TempStatus { get; set; }

        /// <summary>
        /// 已经放在格子里的产品总数
        /// </summary>
        public int CurrentCount { get; set; }

        public int SubAreaId
        {
            get { return _subAreaId; }
            set { _subAreaId = value; }
        }

        public int GridId
        {
            get { return _gridId; }
            set { _gridId = value; }
        }

        public string GridName
        {
            get { return _gridName; }
            set { _gridName = value; }
        }

        public string GridNameNum
        {
            get
            {
                try
                {

              
                if (!string.IsNullOrEmpty(GridName)&&GridName.Length>=1)
                {
                    return GridName.Substring(1);
                }
                else
                {
                    return GridName;
                }
                }
                catch (Exception)
                {
                    return GridName;
                     
                }
            }
        }
        public int SomeId
        {
            get { return _someId; }
            set { _someId = value; }
        }
        public DateTime FirstEnterTime
        {
            get { return _firstEnterTime; }
            set { _firstEnterTime = value; }
        }
        public int Status
        {
            get { return _status; }
            set { _status = value; }
        }

        /// <summary>
        /// 合册时用到。一个格子对应一个产品
        /// </summary>
        public GridRecord_Info recordModel { get; set; }


        #endregion
    }
}
